package org.cornland.systemWarning.service.impl;

import org.cornland.systemWarning.model.PtInstanceConfig;
import org.cornland.systemWarning.mapper.PtInstanceConfigMapper;
import org.cornland.systemWarning.service.PtInstanceConfigService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Hawk Tang
 * @since 2021-10-13
*/


@Service
@Slf4j
public class PtInstanceConfigServiceImpl extends ServiceImpl<PtInstanceConfigMapper, PtInstanceConfig> implements PtInstanceConfigService {

   @Autowired
   private PtInstanceConfigMapper ptInstanceConfigMapper;

   public PtInstanceConfig selectByPrimaryKey(Integer id){
        PtInstanceConfig ptInstanceConfig = ptInstanceConfigMapper.selectById(id);
        return ptInstanceConfig;
   }

   public List<PtInstanceConfig> selectAll(){
        List<PtInstanceConfig> ptInstanceConfigList = ptInstanceConfigMapper.selectList(null);
        return ptInstanceConfigList;
   }

   public Integer insert(PtInstanceConfig ptInstanceConfig){
        int result = ptInstanceConfigMapper.insert(ptInstanceConfig);
        return result;
   }

   public Integer updateByPrimaryKey(PtInstanceConfig ptInstanceConfig){
        int result = ptInstanceConfigMapper.updateById(ptInstanceConfig);
        return result;
   }

   public Integer deleteByPrimaryKey(Integer id){
        int result = ptInstanceConfigMapper.deleteById(id);
        return result;
   }







}